#include "StdAfx.h"
#include "TimeLineImp.h"

TimeLineImp::TimeLineImp(void)
{
}

TimeLineImp::~TimeLineImp(void)
{
}

bool TimeLineImp::InRange( const NTFSFileTime & stamps,const SYSTEMTIME & startTime,const SYSTEMTIME &endTime )
{
	const FileNameTime &FN = stamps.fileNameTime;
	const StdInfoTime &SI = stamps.stdInfoTime;
	bool ret = false;
	//fn
	if (InRange(FN.access,startTime,endTime))
		return true;
	if (InRange(FN.creation,startTime,endTime))
		return true;
	if (InRange(FN.entry,startTime,endTime))
		return true;
	if (InRange(FN.modify,startTime,endTime))
		return true;
	//si
	if (InRange(SI.access,startTime,endTime))
		return true;
	if (InRange(SI.creation,startTime,endTime))
		return true;
	if (InRange(SI.entry,startTime,endTime))
		return true;
	if (InRange(SI.modify,startTime,endTime))
		return true;
	return false;
}

bool TimeLineImp::InRange( const SYSTEMTIME & stamp,const SYSTEMTIME & startTime,const SYSTEMTIME &endTime )
{
	return stamp>=startTime && endTime>=stamp;
}
